# Data analysisimport geopandas as gpdimport numpy as npimport pandas as pdimport intakeimport daskfrom shapely.geometry import Point# APIs and dataimport requestsimport cenpyimport pygris# Plottingimport seaborn as snsfrom matplotlib import pyplot as pltimport altair as altimport holoviews as hvimport hvplot.pandasimport geoviews as gvimport geoviews.tile_sources as gvtsimport datashader as dsimport datashader.transfer_functions as tffrom datashader.colors import Greys9, viridis, infernofrom colorcet import fire, kgy, CET_CBL3# Sci-Kit Learnfrom sklearn.preprocessing import StandardScaler, MinMaxScaler, RobustScalerfrom sklearn.cluster import KMeanspd.options.display.max_columns =999
C:\Users\fatbo\mambaforge\envs\musa-550-fall-2023\lib\site-packages\libpysal\cg\alpha_shapes.py:39: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
def nb_dist(x, y):
C:\Users\fatbo\mambaforge\envs\musa-550-fall-2023\lib\site-packages\libpysal\cg\alpha_shapes.py:165: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
def get_faces(triangle):
C:\Users\fatbo\mambaforge\envs\musa-550-fall-2023\lib\site-packages\libpysal\cg\alpha_shapes.py:199: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
def build_faces(faces, triangles_is, num_triangles, num_faces_single):
C:\Users\fatbo\mambaforge\envs\musa-550-fall-2023\lib\site-packages\libpysal\cg\alpha_shapes.py:261: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
def nb_mask_faces(mask, faces):
Mapping Global Cell Towers
First and foremost, let’s take a broad look at cell tower coverage across the world. The OpenCellID database has a dataframe with over 200 million observations of cell towers, which we can aggregate and plot using Intake, Dask, and Datashader. Based on this visualization, we’ll notice regions with high concentrations of cell towers are primarily the USA, most of Europe, Japan, South Korea, while noticeable blind spots take place in central Africa, South America, west Asia, and rural China.
FileNotFoundError: An error occurred while calling the read_csv method registered to the pandas backend.
Original Message: [WinError 2] The system cannot find the file specified: 'C:/Users/fatbo/OneDrive/Documents/GitHub/final-project-stephanie_jarred_alec/data/cell_towers.csv'
max_lon = ddf['lon'].max().compute()min_lon = ddf['lon'].min().compute()max_lat = ddf['lat'].max().compute()min_lat = ddf['lat'].min().compute()print(f"Max Longitude: {max_lon}, Min Longitude: {min_lon}")print(f"Max Latitude: {max_lat}, Min Latitude: {min_lat}")
Max Longitude: 179.9732208252, Min Longitude: -179.9732208252
Max Latitude: 78.334579467773, Min Latitude: -54.936431
Next, we can take a closer look at the differences across global cell networks based on the radio system type. This can help us understand the difference in advancement of ICT across different countries.
We may be more familiar with these radio systems as supporting “2G,” “3G,” or “4G” mobile network. According to this article by Wilson Amplifiers:
GSM is the standard radio system supporting 2G network
CDMA is a competitor to GSM also supporting 2G network
UMTS of the GSM network supports 3G network
LTE migrates CDMA/CDMA2000 and GSM/UMTS into the 4G network
NR is a “New Radio” technology supporting 5G network
With this second visualization, we’ll notice that a vast majority of cell towers across the world use UMTS radio system and support 3G mobile data, while some concentrations of LTE exist across the USA, India, East Asia, and Europe.
Global Cell Tower Coverage Dominant Types
Given these differences in cell tower types, let’s take a look at how these differences line up across other country metrics, particularly population and GDP per capita. This will allow us to conduct an analysis of cell tower coverage and type across developing and developed countries. Along with OpenCellID data, this section will use data from the World Bank.
For each country, a ‘dominant cell type’ will be determined by which type of cell tower is most common in the respective country. Unfortunately, there is no NR (new radio, 5G) data for this section.
In the following map, we can identify quickly what the leading cell tower type is in each country, suggesting how advanced their cell tower technology is. Most notably, China, USA, Norway, Australia and Japan are leading with 4G LTE technology. Unfortunately, not all countries have sufficient data and some have been dropped from this analysis.
WARNING:param.main: geometry option not found for polygons plot; similar options include: []
WARNING:param.main:geometry option not found for polygons plot; similar options include: []